<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=0.8"/><title>20&nbsp;并行</title><link rel="stylesheet" type="text/css" href="scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="racket.css" title="default"/><link rel="stylesheet" type="text/css" href="figure.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="manual-racket.css" title="default"/><script type="text/javascript" src="scribble-common.js"></script><script type="text/javascript" src="figure.js"></script><script type="text/javascript" src="manual-racket.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="scribble-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9660;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Racket&#25351;&#21335;</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="intro.html" class="tocviewlink" data-pltdoc="x">&#27426;&#36814;&#26469;&#21040;Racket!</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="to-scheme.html" class="tocviewlink" data-pltdoc="x">Racket&#27010;&#35201;</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="datatypes.html" class="tocviewlink" data-pltdoc="x">&#20869;&#32622;&#30340;&#25968;&#25454;&#31867;&#22411;</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="scheme-forms.html" class="tocviewlink" data-pltdoc="x">&#34920;&#36798;&#24335;&#21644;&#23450;&#20041;</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="define-struct.html" class="tocviewlink" data-pltdoc="x">&#31243;&#24207;&#21592;&#23450;&#20041;&#30340;&#25968;&#25454;&#31867;&#22411;</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="modules.html" class="tocviewlink" data-pltdoc="x">&#27169;&#22359;</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">&#21512;&#32422;</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="i_o.html" class="tocviewlink" data-pltdoc="x">&#36755;&#20837;&#21644;&#36755;&#20986;</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="regexp.html" class="tocviewlink" data-pltdoc="x">&#27491;&#21017;&#34920;&#36798;&#24335;</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">&#24322;&#24120;&#19982;&#25511;&#21046;</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="for.html" class="tocviewlink" data-pltdoc="x">&#36845;&#20195;&#21644;&#25512;&#23548;</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">&#27169;&#24335;&#21305;&#37197;</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="classes.html" class="tocviewlink" data-pltdoc="x">&#31867;&#21644;&#23545;&#35937;</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="units.html" class="tocviewlink" data-pltdoc="x">&#21333;&#20803;</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="reflection.html" class="tocviewlink" data-pltdoc="x">&#21453;&#23556;&#21644;&#21160;&#24577;&#27714;&#20540;</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="macros.html" class="tocviewlink" data-pltdoc="x">&#23439;</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="languages.html" class="tocviewlink" data-pltdoc="x">&#21019;&#36896;&#35821;&#35328;</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">&#24182;&#21457;&#19982;&#21516;&#27493;</a></td></tr><tr><td align="right">19&nbsp;</td><td><a href="performance.html" class="tocviewlink" data-pltdoc="x">&#24615;&#33021;</a></td></tr><tr><td align="right">20&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">&#24182;&#34892;</a></td></tr><tr><td align="right">21&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">&#36816;&#34892;&#21644;&#21019;&#24314;&#21487;&#25191;&#34892;&#31243;&#24207;</a></td></tr><tr><td align="right">22&nbsp;</td><td><a href="More_Libraries.html" class="tocviewlink" data-pltdoc="x">&#26356;&#22810;&#30340;&#24211;</a></td></tr><tr><td align="right">23&nbsp;</td><td><a href="dialects.html" class="tocviewlink" data-pltdoc="x">Racket&#21644;Scheme&#30340;&#26041;&#35328;</a></td></tr><tr><td align="right">24&nbsp;</td><td><a href="other-editors.html" class="tocviewlink" data-pltdoc="x">&#21629;&#20196;&#34892;&#24037;&#20855;&#21644;&#20320;&#30340;&#32534;&#36753;&#22120;&#36873;&#25321;</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9658;</a></td><td>20&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">&#24182;&#34892;</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">20.1&nbsp;</td><td><a href="#%28part._effective-futures%29" class="tocviewlink" data-pltdoc="x">&#21069;&#26223;&#24182;&#34892;</a></td></tr><tr><td align="right">20.2&nbsp;</td><td><a href="#%28part._effective-places%29" class="tocviewlink" data-pltdoc="x">&#29616;&#22330;&#65288;place&#65289;&#24182;&#34892;</a></td></tr><tr><td align="right">20.3&nbsp;</td><td><a href="#%28part._distributed-places%29" class="tocviewlink" data-pltdoc="x">&#20998;&#24067;&#24335;&#29616;&#22330;</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">20.1<tt>&nbsp;</tt></span><a href="#%28part._effective-futures%29" class="tocsubseclink" data-pltdoc="x">&#21069;&#26223;&#24182;&#34892;</a></td></tr><tr><td><span class="tocsublinknumber">20.2<tt>&nbsp;</tt></span><a href="#%28part._effective-places%29" class="tocsubseclink" data-pltdoc="x">&#29616;&#22330;&#65288;place&#65289;&#24182;&#34892;</a></td></tr><tr><td><span class="tocsublinknumber">20.3<tt>&nbsp;</tt></span><a href="#%28part._distributed-places%29" class="tocsubseclink" data-pltdoc="x">&#20998;&#24067;&#24335;&#29616;&#22330;</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><div class="nosearchform"></div>&nbsp;&nbsp;</span><span class="navright">&nbsp;&nbsp;<a href="performance.html" title="backward to &quot;19 性能&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Racket指南&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="running.html" title="forward to &quot;21 运行和创建可执行程序&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h3>20<tt>&nbsp;</tt><a name="(part._parallelism)"></a>&#24182;&#34892;</h3><p>Racket&#25552;&#20379;&#20004;&#31181;&#24418;&#24335;&#30340;<a name="(tech._~e5~b9~b6~e8~a1~8c~ef~bc~88parallelism~ef~bc~89)"></a><span style="font-style: italic">&#24182;&#34892;&#65288;parallelism&#65289;</span>&#65306;<a href="#%28tech._~e5~89~8d~e6~99~af~ef~bc~88futures~ef~bc~89%29" class="techoutside" data-pltdoc="x"><span class="techinside">&#21069;&#26223;&#65288;futures&#65289;</span></a>&#21644;<font class="badlink"><span class="techoutside"><span class="techinside">&#29616;&#22330;&#65288;places&#65289;</span></span></font>&#12290;&#22312;&#25552;&#20379;&#22810;&#20010;&#22788;&#29702;&#22120;&#30340;&#24179;&#21488;&#19978;&#65292;&#24182;&#34892;&#21487;&#20197;&#25552;&#39640;&#19968;&#20010;&#31243;&#24207;&#30340;&#36816;&#34892;&#26102;&#24615;&#33021;&#12290;</p><p>&#20851;&#20110;Racket&#37324;&#36830;&#32493;&#24615;&#33021;&#30340;&#20449;&#24687;&#21448;&#35265;<a href="performance.html" data-pltdoc="x">&#24615;&#33021;</a>&#12290;Racket&#36824;&#25552;&#20379;&#20102;&#23545;<font class="badlink"><span class="techoutside"><span class="techinside">&#24182;&#21457;&#65288;concurrency&#65289;</span></span></font>&#30340;&#32447;&#31243;&#65292;&#20294;&#32447;&#31243;&#27809;&#26377;&#25552;&#20379;&#24182;&#34892;&#65307;&#26356;&#22810;&#30340;&#20449;&#24687;&#35265;<a href="concurrency.html" data-pltdoc="x">&#24182;&#21457;&#19982;&#21516;&#27493;</a>&#12290;</p><h4>20.1<tt>&nbsp;</tt><a name="(part._effective-futures)"></a>&#21069;&#26223;&#24182;&#34892;</h4><p><font class="badlink"><span class="RktModLink"><span class="RktSym">racket/future</span></span></font>&#24211;&#36890;&#36807;&#19982;<a name="(tech._~e5~89~8d~e6~99~af~ef~bc~88futures~ef~bc~89)"></a><span style="font-style: italic">&#21069;&#26223;&#65288;futures&#65289;</span>&#20197;&#21450;<span class="RktSym"><span class="badlink"><span class="RktValLink">future</span></span></span>&#21644;<span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span>&#20989;&#25968;&#30340;&#24182;&#34892;&#65292;&#20026;&#24615;&#33021;&#25913;&#36827;&#25552;&#20379;&#25903;&#25345;&#12290;&#28982;&#32780;&#65292;&#36825;&#20123;&#32467;&#26500;&#30340;&#24182;&#34892;&#24615;&#21463;&#21040;&#20960;&#20010;&#22240;&#32032;&#30340;&#38480;&#21046;&#65292;&#24403;&#21069;&#30340;&#23454;&#29616;&#26368;&#36866;&#21512;&#20110;&#25968;&#20540;&#20219;&#21153;&#12290;&#22312;<a href="performance.html#%28part._.Dr.Racket-perf%29" data-pltdoc="x">DrRacket&#20013;&#30340;&#24615;&#33021;</a>&#20013;&#30340;&#35686;&#21578;&#20063;&#36866;&#29992;&#20110;&#21069;&#26223;&#65307;&#20540;&#24471;&#27880;&#24847;&#30340;&#26159;&#65292;&#35843;&#35797;&#25163;&#27573;&#30446;&#21069;&#20351;&#21069;&#26223;&#22833;&#25928;&#20102;&#12290;</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>&#20854;&#23427;&#20989;&#25968;&#65292;&#22914;<span class="RktSym"><span class="badlink"><span class="RktValLink">thread</span></span></span>&#65292;&#25903;&#25345;&#21019;&#24314;&#21487;&#38752;&#30340;&#24182;&#21457;&#20219;&#21153;&#12290;&#28982;&#32780;&#65292;&#21363;&#20351;&#30828;&#20214;&#21644;&#25805;&#20316;&#31995;&#32479;&#25903;&#25345;&#24182;&#34892;&#24615;&#65292;&#32447;&#31243;&#20063;&#19981;&#20250;&#30495;&#27491;&#24182;&#34892;&#36816;&#34892;&#12290;</p></blockquote></blockquote></blockquote><p>&#20316;&#20026;&#19968;&#20010;&#24320;&#22987;&#30340;&#20363;&#23376;&#65292;<span class="RktSym">any-double?</span>&#20989;&#25968;&#33719;&#21462;&#19968;&#20010;&#25968;&#23383;&#21015;&#34920;&#65292;&#24182;&#30830;&#23450;&#21015;&#34920;&#20013;&#30340;&#20219;&#20309;&#25968;&#23383;&#26377;&#19968;&#20010;&#20063;&#21253;&#21547;&#22312;&#21015;&#34920;&#20013;&#30340;double&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">for/or</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">in-list</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">for/or</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i2</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">in-list</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">=</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">i2</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#36825;&#20010;&#20989;&#25968;&#22312;&#20108;&#27425;&#26102;&#38388;&#20013;&#36816;&#34892;&#65292;&#25152;&#20197;&#20687;<span class="RktSym">l1</span>&#21644;<span class="RktSym">l2</span>&#36825;&#26679;&#30340;&#22823;&#21015;&#34920;&#21487;&#33021;&#38656;&#35201;&#24456;&#38271;&#26102;&#38388;&#65288;&#25353;&#31186;&#39034;&#24207;&#65289;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">l1</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">for/list</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">in-range</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">5000</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">+</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">l2</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">for/list</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">in-range</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">5000</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">or</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="hspace">&nbsp;</span><span class="RktSym">l1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="hspace">&nbsp;</span><span class="RktSym">l2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#21152;&#36895;<span class="RktSym">any-double?</span>&#30340;&#26368;&#22909;&#30340;&#21150;&#27861;&#26159;&#20351;&#29992;&#19981;&#21516;&#30340;&#31639;&#27861;&#12290;&#28982;&#32780;&#65292;&#22312;&#25552;&#20379;&#33267;&#23569;&#20004;&#20010;&#22788;&#29702;&#21333;&#20803;&#30340;&#26426;&#22120;&#19978;&#65292;&#19978;&#36848;&#31034;&#20363;&#21487;&#20197;&#20351;&#29992;<span class="RktSym"><span class="badlink"><span class="RktValLink">future</span></span></span>&#21644;<span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span>&#30340;&#22823;&#32422;&#19968;&#21322;&#26102;&#38388;&#36816;&#34892;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">future</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">lambda</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="hspace">&nbsp;</span><span class="RktSym">l2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">or</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="hspace">&nbsp;</span><span class="RktSym">l1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">f</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#21069;&#26223;<span class="RktSym">f</span>&#22312;&#19982;<span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="stt"> </span><span class="RktSym">l1</span><span class="RktPn">)</span>&#24179;&#34892;&#20013;&#36816;&#34892;<span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="stt"> </span><span class="RktSym">l2</span><span class="RktPn">)</span>&#65292;&#21516;&#26102;&#23545;<span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="stt"> </span><span class="RktSym">l2</span><span class="RktPn">)</span>&#30340;&#32467;&#26524;&#19982;<span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span><span class="stt"> </span><span class="RktSym">f</span><span class="RktPn">)</span>&#25152;&#35201;&#27714;&#30340;&#26102;&#38388;&#30456;&#21516;&#12290;</p><p>&#21482;&#35201;&#20182;&#20204;&#33021;&#23433;&#20840;&#22320;&#20570;&#21040;&#36825;&#19968;&#28857;&#65292;&#21069;&#26223;&#23601;&#21487;&#20197;&#24182;&#34892;&#36816;&#34892;&#65292;&#20294;&#8220;&#21069;&#26223;&#23433;&#20840;&#8221;&#30340;&#27010;&#24565;&#23454;&#38469;&#19978;&#19982;&#23454;&#26045;&#26377;&#20851;&#12290;&#8220;&#21069;&#26223;&#23433;&#20840;&#8221;&#21644;&#8220;&#21069;&#26223;&#19981;&#23433;&#20840;&#8221;&#25805;&#20316;&#20043;&#38388;&#30340;&#21306;&#21035;&#22312;Racket&#31243;&#24207;&#32423;&#21035;&#19978;&#21487;&#33021;&#36824;&#19981;&#22826;&#26126;&#26174;&#12290;&#26412;&#33410;&#21097;&#20313;&#37096;&#20998;&#36890;&#36807;&#19968;&#20010;&#20363;&#23376;&#26469;&#35828;&#26126;&#36825;&#31181;&#21306;&#21035;&#65292;&#24182;&#26174;&#31034;&#22914;&#20309;&#20351;&#29992;&#21069;&#26223;&#30340;&#21487;&#35270;&#21270;&#24037;&#20855;&#26377;&#21161;&#20110;&#38416;&#26126;&#36825;&#19968;&#28857;&#12290;</p><p>&#32771;&#34385;&#19968;&#19979;&#26364;&#24503;&#23572;&#24067;&#32599;&#29305;&#38598;&#21512;&#35745;&#31639;&#30340;&#20197;&#19979;&#26680;&#24515;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktSym">iterations</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">ci</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">/</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">cr</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">/</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1.5</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">zi</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">if</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">&gt;</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktSym">iterations</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">i</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">ziq</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">cond</span></span></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">&gt;</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">+</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktSym">ziq</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym"><span class="badlink"><span class="RktValLink">else</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">add1</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">+</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktSym">ziq</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">cr</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">+</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">ci</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#34920;&#36798;&#24335;<span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="stt"> </span><span class="RktVal">10000000</span><span class="stt"> </span><span class="RktVal">62</span><span class="stt"> </span><span class="RktVal">500</span><span class="stt"> </span><span class="RktVal">1000</span><span class="RktPn">)</span>&#21644;<span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="stt"> </span><span class="RktVal">10000000</span><span class="stt"> </span><span class="RktVal">62</span><span class="stt"> </span><span class="RktVal">501</span><span class="stt"> </span><span class="RktVal">1000</span><span class="RktPn">)</span>&#27599;&#27425;&#37117;&#35201;&#33457;&#19968;&#28857;&#26102;&#38388;&#20135;&#29983;&#19968;&#20010;&#31572;&#26696;&#12290;&#24403;&#28982;&#65292;&#35745;&#31639;&#20004;&#32773;&#37117;&#38656;&#35201;&#20004;&#20493;&#30340;&#26102;&#38388;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktVal">10000000</span><span class="hspace">&nbsp;</span><span class="RktVal">62</span><span class="hspace">&nbsp;</span><span class="RktVal">500</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktVal">10000000</span><span class="hspace">&nbsp;</span><span class="RktVal">62</span><span class="hspace">&nbsp;</span><span class="RktVal">501</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#19981;&#24184;&#30340;&#26159;&#65292;&#35797;&#22270;&#29992;<span class="RktSym"><span class="badlink"><span class="RktValLink">future</span></span></span>&#24182;&#34892;&#36816;&#34892;&#20004;&#20010;&#35745;&#31639;&#24182;&#19981;&#33021;&#25552;&#39640;&#24615;&#33021;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">future</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">lambda</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktVal">10000000</span><span class="hspace">&nbsp;</span><span class="RktVal">62</span><span class="hspace">&nbsp;</span><span class="RktVal">501</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktVal">10000000</span><span class="hspace">&nbsp;</span><span class="RktVal">62</span><span class="hspace">&nbsp;</span><span class="RktVal">500</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">f</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#35201;&#30693;&#36947;&#20026;&#20160;&#20040;&#65292;&#20351;&#29992;<font class="badlink"><span class="RktModLink"><span class="RktSym">future-visualizer</span></span></font>&#65292;&#20687;&#36825;&#26679;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">require</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">future-visualizer</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">visualize-futures</span></span></span></td></tr><tr><td><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">f</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">future</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">lambda</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktVal">10000000</span><span class="hspace">&nbsp;</span><span class="RktVal">62</span><span class="hspace">&nbsp;</span><span class="RktVal">501</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktVal">10000000</span><span class="hspace">&nbsp;</span><span class="RktVal">62</span><span class="hspace">&nbsp;</span><span class="RktVal">500</span><span class="hspace">&nbsp;</span><span class="RktVal">1000</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">f</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#36825;&#23558;&#25171;&#24320;&#19968;&#20010;&#31383;&#21475;&#65292;&#26174;&#31034;&#35745;&#31639;&#36319;&#36394;&#30340;&#22270;&#24418;&#35270;&#22270;&#12290;&#31383;&#21475;&#30340;&#24038;&#19978;&#37096;&#20998;&#21253;&#21547;&#19968;&#20010;&#25191;&#34892;&#26102;&#38388;&#32447;&#65306;</p><p><span class="RktRes"><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_2.png" alt="image" width="606" height="306"/></span></p><p>&#27599;&#20010;&#27700;&#24179;&#34892;&#20195;&#34920;&#19968;&#20010;&#25805;&#20316;&#31995;&#32479;&#32423;&#32447;&#31243;&#65292;&#30528;&#33394;&#28857;&#20195;&#34920;&#31243;&#24207;&#25191;&#34892;&#20013;&#30340;&#37325;&#35201;&#20107;&#20214;&#65288;&#23427;&#20204;&#34987;&#39068;&#33394;&#32534;&#30721;&#20197;&#21306;&#20998;&#19968;&#20010;&#20107;&#20214;&#31867;&#22411;&#19982;&#21478;&#19968;&#20010;&#20107;&#20214;&#65289;&#12290;&#26102;&#38388;&#36724;&#30340;&#19978;&#24038;&#20301;&#32622;&#34013;&#33394;&#22278;&#28857;&#20195;&#34920;&#26410;&#26469;&#30340;&#21019;&#36896;&#12290;&#21069;&#26223;&#22312;&#32447;&#31243;1&#19978;&#25191;&#34892;&#19968;&#20010;&#30701;&#26242;&#30340;&#26102;&#26399;&#65288;&#30001;&#31532;&#20108;&#34892;&#20013;&#30340;&#32511;&#33394;&#26465;&#34920;&#31034;&#65289;&#65292;&#28982;&#21518;&#26242;&#20572;&#20197;&#20801;&#35768;&#36816;&#34892;&#26102;&#32447;&#31243;&#25191;&#34892;&#21069;&#26223;&#19981;&#23433;&#20840;&#25805;&#20316;&#12290;</p><p>&#22312;Racket&#30340;&#23454;&#29616;&#20013;&#65292;&#21069;&#26223;&#19981;&#23433;&#20840;&#25805;&#20316;&#20998;&#20026;&#20004;&#31867;&#12290;&#19968;&#20010;<a name="(tech._~e9~98~bb~e5~a1~9e~ef~bc~88blocking~ef~bc~89)"></a><span style="font-style: italic">&#38459;&#22622;&#65288;blocking&#65289;</span>&#25805;&#20316;&#20013;&#27490;&#21069;&#26223;&#27714;&#20540;&#65292;&#21516;&#26102;&#19981;&#20801;&#35768;&#23427;&#32487;&#32493;&#19979;&#21435;&#65292;&#30452;&#21040;&#23427;&#34987;&#25509;&#35302;&#65288;touched&#65289;&#12290;&#22312;<span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span>&#20013;&#30340;&#25805;&#20316;&#23436;&#25104;&#20043;&#21518;&#65292;&#21069;&#26223;&#24037;&#20316;&#30340;&#21097;&#20313;&#37096;&#20998;&#23558;&#30001;&#36816;&#34892;&#26102;&#32447;&#31243;&#20381;&#27425;&#36827;&#34892;&#27714;&#20540;&#12290;&#19968;&#20010;<a name="(tech._~e5~90~8c~e6~ad~a5~ef~bc~88synchronized~ef~bc~89)"></a><span style="font-style: italic">&#21516;&#27493;&#65288;synchronized&#65289;</span>&#25805;&#20316;&#20063;&#20013;&#27490;&#21069;&#26223;&#65292;&#20294;&#36816;&#34892;&#26102;&#32447;&#31243;&#21487;&#20197;&#22312;&#20219;&#20309;&#26102;&#38388;&#25191;&#34892;&#25805;&#20316;&#65292;&#19968;&#26086;&#23436;&#25104;&#65292;&#21069;&#26223;&#21487;&#33021;&#22312;&#24182;&#34892;&#20013;&#32487;&#32493;&#36816;&#34892;&#12290;&#20869;&#23384;&#20998;&#37197;&#21644;JIT&#32534;&#35793;&#26159;&#21516;&#27493;&#25805;&#20316;&#30340;&#20004;&#20010;&#24120;&#35265;&#31034;&#20363;&#12290;</p><p>&#22312;&#26102;&#38388;&#32447;&#20013;&#65292;&#25105;&#20204;&#22312;&#32447;&#31243;1&#30340;&#32511;&#33394;&#26465;&#30340;&#21491;&#36793;&#30475;&#21040;&#19968;&#20010;&#27225;&#33394;&#28857;&#8212;&#8212;&#36825;&#20010;&#28857;&#20195;&#34920;&#19968;&#20010;&#21516;&#27493;&#25805;&#20316;&#65288;&#20869;&#23384;&#20998;&#37197;&#65289;&#12290;&#32447;&#31243;0&#19978;&#30340;&#31532;&#19968;&#20010;&#27225;&#33394;&#22278;&#28857;&#34920;&#31034;&#36816;&#34892;&#26102;&#32447;&#31243;&#22312;&#23558;&#26469;&#26242;&#20572;&#21518;&#24456;&#24555;&#25191;&#34892;&#20998;&#37197;&#12290;&#19981;&#20037;&#20043;&#21518;&#65292;&#22312;&#19968;&#20010;&#38459;&#22622;&#25805;&#20316;&#21069;&#26223;&#20013;&#27490;&#65288;&#31532;&#19968;&#20010;&#32418;&#28857;&#65289;&#65292;&#24182;&#19988;&#24517;&#39035;&#31561;&#21040;&#23427;&#34987;&#27714;&#20540;&#30340;<span class="RktSym"><span class="badlink"><span class="RktValLink">touch</span></span></span>&#65288;&#30053;&#21518;1049ms&#26631;&#35760;&#65289;&#12290;</p><p>&#24403;&#20320;&#25226;&#40736;&#26631;&#31227;&#21160;&#21040;&#19968;&#20010;&#20107;&#20214;&#65292;&#21487;&#35270;&#21270;&#24037;&#20855;&#26174;&#31034;&#20320;&#30340;&#26377;&#20851;&#20107;&#20214;&#21644;&#30011;&#31661;&#22836;&#36830;&#25509;&#22312;&#30456;&#24212;&#30340;&#21069;&#26223;&#20107;&#20214;&#30340;&#35814;&#32454;&#20449;&#24687;&#12290;&#36825;&#24352;&#22270;&#29255;&#26174;&#31034;&#20102;&#23545;&#25105;&#20204;&#30340;&#26410;&#26469;&#30340;&#32852;&#31995;&#12290;</p><p><span class="RktRes"><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_3.png" alt="image" width="606" height="306"/></span></p><p>&#34394;&#32447;&#27225;&#33394;&#32447;&#36830;&#25509;&#21069;&#26223;&#20013;&#30340;&#31532;&#19968;&#20010;&#20107;&#20214;&#21040;&#21019;&#36896;&#23427;&#30340;&#21069;&#26223;&#65292;&#21516;&#26102;&#32043;&#33394;&#32447;&#36830;&#25509;&#21069;&#26223;&#37324;&#30340;&#37051;&#36817;&#20107;&#20214;&#12290;</p><p>&#25105;&#20204;&#27809;&#26377;&#30475;&#21040;&#24182;&#34892;&#24615;&#30340;&#21407;&#22240;&#26159;&#65292;<span class="RktSym">mandelbrot</span>&#20013;&#30340;&#24490;&#29615;&#30340;&#19979;&#19968;&#37096;&#20998;&#20013;&#30340;<span class="RktSym"><span class="badlink"><span class="RktValLink">&lt;</span></span></span>&#21644;<span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span>&#25805;&#20316;&#21253;&#25324;&#19968;&#20010;&#28014;&#28857;&#20540;&#21644;&#22266;&#23450;&#65288;&#25972;&#25968;&#65289;&#20540;&#30340;&#28151;&#21512;&#12290;&#36825;&#31181;&#28151;&#21512;&#36890;&#24120;&#35302;&#21457;&#19968;&#20010;&#22312;&#25191;&#34892;&#36807;&#31243;&#20013;&#24930;&#36335;&#24452;&#65292;&#24182;&#19988;&#36825;&#20010;&#26222;&#36890;&#30340;&#24930;&#36335;&#24452;&#36890;&#24120;&#20250;&#38459;&#22622;&#12290;</p><p>&#23558;&#24120;&#25968;&#21464;&#20026;&#31532;&#19968;&#20010;&#38382;&#39064;&#30340;<span class="RktSym">mandelbrot</span>&#22320;&#22336;&#20013;&#30340;&#28014;&#28857;&#25968;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktSym">iterations</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">ci</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">/</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">cr</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">/</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1.5</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">zi</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">if</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">&gt;</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktSym">iterations</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">i</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">ziq</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">cond</span></span></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">&gt;</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">+</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktSym">ziq</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">4.0</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym"><span class="badlink"><span class="RktValLink">else</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">add1</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">+</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktSym">ziq</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">cr</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">+</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">ci</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#38543;&#30528;&#36825;&#31181;&#21464;&#21270;&#65292;<span class="RktSym">mandelbrot</span>&#35745;&#31639;&#21487;&#20197;&#24182;&#34892;&#36816;&#34892;&#12290;&#28982;&#32780;&#65292;&#25105;&#20204;&#20173;&#28982;&#30475;&#21040;&#19968;&#31181;&#29305;&#27530;&#30340;&#24930;&#36335;&#24452;&#25805;&#20316;&#38480;&#21046;&#20102;&#25105;&#20204;&#30340;&#24182;&#34892;&#24615;&#65288;&#27225;&#33394;&#28857;&#65289;&#65306;</p><p><span class="RktRes"><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_4.png" alt="image" width="606" height="206"/></span></p><p>&#38382;&#39064;&#26159;&#65292;&#36825;&#20010;&#20363;&#23376;&#20013;&#30340;&#22823;&#22810;&#25968;&#31639;&#26415;&#36816;&#31639;&#37117;&#20250;&#20135;&#29983;&#19968;&#20010;&#19981;&#31934;&#30830;&#30340;&#25968;&#23383;&#65292;&#23427;&#30340;&#23384;&#20648;&#24517;&#39035;&#34987;&#20998;&#37197;&#12290;&#34429;&#28982;&#26377;&#20123;&#37197;&#32622;&#21487;&#20197;&#23433;&#20840;&#22320;&#21482;&#22312;&#27809;&#26377;&#36816;&#34892;&#26102;&#32447;&#31243;&#30340;&#24773;&#20917;&#19979;&#23433;&#20840;&#22320;&#25191;&#34892;&#65292;&#29305;&#21035;&#26159;&#39057;&#32321;&#20998;&#37197;&#38656;&#35201;&#21516;&#27493;&#25805;&#20316;&#26469;&#20811;&#26381;&#20219;&#20309;&#24615;&#33021;&#25913;&#36827;&#12290;</p><p>&#21033;&#29992;<a href="performance.html#%28tech._flonum%29" class="techoutside" data-pltdoc="x"><span class="techinside">flonum</span></a>&#20855;&#20307;&#25805;&#20316;&#65288;&#35265;<a href="performance.html#%28part._fixnums%2Bflonums%29" data-pltdoc="x">Fixnum&#21644;Flonum&#20248;&#21270;</a>&#65289;&#65292;&#25105;&#20204;&#21487;&#20197;&#37325;&#20889;<span class="RktSym">mandelbrot</span>&#20197;&#36798;&#21040;&#29992;&#26356;&#23569;&#30340;&#37197;&#32622;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">mandelbrot</span><span class="hspace">&nbsp;</span><span class="RktSym">iterations</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">ci</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl-</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl/</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-&gt;fl</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-&gt;fl</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1.0</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">cr</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl-</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl/</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-&gt;fl</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">-&gt;fl</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">n</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1.5</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="RktPn">]</span><span class="hspace">&nbsp;</span><span class="RktPn">[</span><span class="RktSym">zi</span><span class="hspace">&nbsp;</span><span class="RktVal">0.0</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">if</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">&gt;</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="hspace">&nbsp;</span><span class="RktSym">iterations</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">i</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl*</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="RktPn">)</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym">ziq</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl*</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">cond</span></span></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl&gt;</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl+</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktSym">ziq</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">4.0</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">[</span><span class="RktSym"><span class="badlink"><span class="RktValLink">else</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">loop</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">add1</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">i</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl+</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl-</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zrq</span><span class="hspace">&nbsp;</span><span class="RktSym">ziq</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">cr</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl+</span></span></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl*</span></span></span><span class="hspace">&nbsp;</span><span class="RktVal">2.0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">fl*</span></span></span><span class="hspace">&nbsp;</span><span class="RktSym">zr</span><span class="hspace">&nbsp;</span><span class="RktSym">zi</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">ci</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><p>&#21363;&#20351;&#26159;&#22312;&#36830;&#32493;&#27169;&#24335;&#19979;&#65292;&#36825;&#31181;&#36716;&#25442;&#21487;&#20197;&#23558;<span class="RktSym">mandelbrot</span>&#36895;&#24230;&#25552;&#39640;8&#20493;&#65292;&#20294;&#36991;&#20813;&#20998;&#37197;&#20063;&#20801;&#35768;<span class="RktSym">mandelbrot</span>&#22312;&#24182;&#34892;&#20013;&#26356;&#24555;&#22320;&#36816;&#34892;&#12290;&#25191;&#34892;&#36825;&#20010;&#31243;&#24207;&#20135;&#29983;&#19979;&#38754;&#30340;&#21487;&#35270;&#21270;&#24037;&#20855;&#65306;</p><p><span class="RktRes"><img style="vertical-align: 0px; margin: -3px -3px -3px -3px;" src="pict_5.png" alt="image" width="606" height="206"/></span></p><p>&#27880;&#24847;&#65292;&#36825;&#37324;&#21482;&#26174;&#31034;&#19968;&#20010;&#32511;&#33394;&#26465;&#65292;&#22240;&#20026;&#26364;&#24503;&#23572;&#24067;&#32599;&#29305;&#35745;&#31639;&#20013;&#27809;&#26377;&#19968;&#20010;&#26159;&#30001;&#19968;&#20010;&#21069;&#26223;&#65288;&#36816;&#34892;&#26102;&#32447;&#31243;&#65289;&#27714;&#20540;&#30340;&#12290;</p><p>&#20316;&#20026;&#19968;&#20010;&#36890;&#29992;&#20934;&#21017;&#65292;&#22312;&#24182;&#34892;&#20013;&#36890;&#36807;<a href="performance.html#%28tech._jit%29" class="techoutside" data-pltdoc="x"><span class="techinside">JIT</span></a>&#32534;&#35793;&#22120;&#20869;&#32852;&#23433;&#20840;&#36816;&#34892;&#30340;&#20219;&#20309;&#25805;&#20316;&#65292;&#24403;&#27809;&#26377;&#20869;&#32852;&#65288;&#21253;&#25324;&#25152;&#26377;&#30340;&#25805;&#20316;&#22914;&#26524;JIT&#32534;&#35793;&#22120;&#26159;&#38750;&#28608;&#27963;&#30340;&#65289;&#30340;&#20854;&#23427;&#25805;&#20316;&#34987;&#35748;&#20026;&#26159;&#19981;&#23433;&#20840;&#30340;&#12290;<span class="stt">raco&#21453;&#32534;&#35793;&#65288;raco decompile&#65289;</span>&#24037;&#20855;&#23545;&#25805;&#20316;&#21487;&#20197;&#34987;&#21453;&#32534;&#35793;&#22120;&#20869;&#32852;&#32534;&#35793;&#65288;&#35265;<font class="badlink">(part ("(lib scribblings/raco/raco.scrbl)" "decompile"))</font>&#65289;&#65292;&#25152;&#20197;&#21453;&#32534;&#35793;&#22120;&#21487;&#20197;&#29992;&#26469;&#24110;&#21161;&#39044;&#27979;&#24182;&#34892;&#24615;&#33021;&#12290;</p><h4>20.2<tt>&nbsp;</tt><a name="(part._effective-places)"></a>&#29616;&#22330;&#65288;place&#65289;&#24182;&#34892;</h4><p><font class="badlink"><span class="RktModLink"><span class="RktSym">racket/place</span></span></font>&#24211;&#36890;&#36807;&#19982;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#34920;&#30340;&#24182;&#34892;&#26469;&#25552;&#20379;&#24615;&#33021;&#25913;&#36827;&#30340;&#25903;&#25345;&#12290;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#34920;&#21019;&#36896;&#20102;&#19968;&#20010;<a name="(tech._~e7~8e~b0~e5~9c~ba~ef~bc~88place~ef~bc~89)"></a><span style="font-style: italic">&#29616;&#22330;&#65288;place&#65289;</span>&#65292;&#36825;&#23454;&#38469;&#19978;&#26159;&#19968;&#20010;&#26032;&#30340;Racket&#23454;&#20363;&#65292;&#21487;&#20197;&#24179;&#34892;&#20110;&#20854;&#23427;&#29616;&#22330;&#65292;&#21253;&#25324;&#21021;&#22987;&#29616;&#22330;&#12290;&#22312;&#27599;&#19968;&#20010;&#29616;&#22330;&#37117;&#21487;&#20197;&#20351;&#29992;Racket&#35821;&#35328;&#30340;&#20840;&#37096;&#21151;&#33021;&#65292;&#20294;&#21482;&#33021;&#36890;&#36807;&#28040;&#24687;&#20256;&#36882;&#26469;&#20256;&#36882;&#29616;&#22330;&#8212;&#8212;&#20351;&#29992;<span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-put</span></span></span>&#21644;<span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-get</span></span></span>&#20989;&#25968;&#22312;&#26377;&#38480;&#30340;&#20540;&#38598;&#19978;&#8212;&#8212;&#36825;&#26377;&#21161;&#20110;&#30830;&#20445;&#24182;&#34892;&#35745;&#31639;&#30340;&#23433;&#20840;&#24615;&#21644;&#29420;&#31435;&#24615;&#12290;</p><p>&#20316;&#20026;&#19968;&#20010;&#24320;&#22987;&#30340;&#20363;&#23376;&#65292;&#19979;&#38754;&#30340;racket&#31243;&#24207;&#20351;&#29992;&#19968;&#20010;<a href="#%28tech._~e7~8e~b0~e5~9c~ba~ef~bc~88place~ef~bc~89%29" class="techoutside" data-pltdoc="x"><span class="techinside">&#29616;&#22330;&#65288;place&#65289;</span></a>&#26469;&#30830;&#23450;&#21015;&#34920;&#20013;&#30340;&#20219;&#20309;&#19968;&#20010;&#25968;&#26159;&#21542;&#26377;&#19968;&#20010;&#20063;&#22312;&#21015;&#34920;&#20013;&#30340;&#21452;&#25968;&#65306;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><font class="badlink"><span class="RktModLink"><span class="RktMod">#lang</span></span></font><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><font class="badlink"><span class="RktModLink"><span class="RktSym">racket</span></span></font><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">provide</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">main</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">for/or</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">in-list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">for/or</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">i2</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">in-list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">=</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">i2</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">*</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">2</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">i</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">main</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">p</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">l</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-get</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">l-double?</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">any-double?</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">l</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-put</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">l-double?</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-put</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">p</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">1</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">2</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">4</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">8</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-get</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">p</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr></table></blockquote><p><span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#21518;&#30340;&#26631;&#35782;&#31526;<span class="RktSym">ch</span>&#32465;&#23450;&#21040; <a name="(tech._~e7~8e~b0~e5~9c~ba~e9~80~9a~e9~81~93~ef~bc~88place._channel~ef~bc~89)"></a><span style="font-style: italic">&#29616;&#22330;&#36890;&#36947;&#65288;place
channel&#65289;</span>&#12290;&#22312;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#34920;&#20013;&#30340;&#21097;&#20313;&#20027;&#20307;&#34920;&#36798;&#24335;&#22312;&#19968;&#20010;&#26032;&#30340;&#29616;&#22330;&#34987;&#27714;&#20540;&#65292;&#36825;&#20010;&#20027;&#20307;&#34920;&#36798;&#24335;&#20351;&#29992;<span class="RktSym">ch</span>&#19982;&#20135;&#29983;&#26032;&#20301;&#32622;&#30340;&#20301;&#32622;&#26469;&#34920;&#36798;&#12290;</p><p>&#22312;&#19978;&#38754;&#30340;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#34920;&#30340;&#20027;&#20307;&#20013;&#65292;&#26032;&#30340;&#20301;&#32622;&#25509;&#25910;&#21040;&#19968;&#20010;&#36229;&#36807;<span class="RktSym">ch</span>&#30340;&#25968;&#23383;&#21015;&#34920;&#65292;&#24182;&#23558;&#21015;&#34920;&#32465;&#23450;&#21040;<span class="RktSym">l</span>&#12290;&#23427;&#25509;&#30528;&#35843;&#29992;&#34920;&#19978;&#30340;<span class="RktSym">any-double?</span>&#24182;&#19988;&#32465;&#23450;&#36825;&#20010;&#32467;&#26524;&#21040;<span class="RktSym">l-double?</span>&#12290;&#26368;&#32456;&#30340;&#20027;&#20307;&#34920;&#36798;&#24335;&#21457;&#36865;<span class="RktSym">l-double?</span>&#32467;&#26524;&#36234;&#36807;<span class="RktSym">ch</span>&#22238;&#21040;&#21407;&#26469;&#30340;&#29616;&#22330;&#12290;</p><p>&#22312;DrRacket&#37324;&#65292;&#20445;&#23384;&#24182;&#36816;&#34892;&#19978;&#38754;&#30340;&#31243;&#24207;&#21518;&#65292;&#22312;&#20132;&#20114;&#31383;&#21475;&#23545;<span class="RktPn">(</span><span class="RktSym">main</span><span class="RktPn">)</span>&#27714;&#20540;&#20197;&#21019;&#24314;&#26032;&#30340;&#29616;&#22330;&#12290;<span class="refelem"><span class="refcolumn"><span class="refcontent">&#24403;&#22312;DrRacket&#20869;&#20351;&#29992;<font class="badlink"><span class="techoutside"><span class="techinside">&#29616;&#22330;&#65288;places&#65289;</span></span></font>&#65292;&#21253;&#21547;&#29616;&#22330;&#20195;&#30721;&#30340;&#27169;&#22359;&#22312;&#23427;&#34987;&#25191;&#34892;&#20043;&#21069;&#24517;&#39035;&#34987;&#20445;&#23384;&#21040;&#19968;&#20010;&#25991;&#20214;&#12290;</span></span></span>&#21478;&#22806;&#65292;&#20316;&#20026;<span class="stt">"double.rkt"</span>&#20445;&#23384;&#35813;&#31243;&#24207;&#24182;&#19988;&#29992;&#20197;&#19979;&#20869;&#23481;&#20174;&#19968;&#20010;&#21629;&#20196;&#34892;&#36816;&#34892;</p><p><span class="hspace">&nbsp;&nbsp;</span><span class="stt">racket -tm double.rkt</span></p><p>&#22312;<span class="nobreak"><span class="stt">-t</span></span>&#26631;&#24535;&#21578;&#35785;<span class="stt">racket</span>&#21152;&#36733;<span class="stt">double.rkt</span>&#27169;&#22359;&#30340;&#22320;&#26041;&#65292;<span class="nobreak"><span class="stt">-m</span></span>&#26631;&#24535;&#35843;&#29992;&#23548;&#20986;&#30340;<span class="RktSym">main</span>&#20989;&#25968;&#65292;&#21516;&#26102;<span class="nobreak"><span class="stt">-tm</span></span>&#32452;&#21512;&#36825;&#20004;&#20010;&#26631;&#24535;&#12290;</p><p><span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#34920;&#26377;&#20004;&#20010;&#24494;&#22937;&#30340;&#29305;&#28857;&#12290;&#39318;&#20808;&#65292;&#23427;&#23558;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#20027;&#20307;&#25552;&#21319;&#20026;&#19968;&#20010;&#21311;&#21517;&#30340;&#27169;&#22359;&#32423;&#30340;&#20989;&#25968;&#12290;&#36825;&#31181;&#25552;&#21319;&#24847;&#21619;&#30528;&#65292;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#20027;&#20307;&#24341;&#29992;&#30340;&#20219;&#20309;&#32465;&#23450;&#37117;&#24517;&#39035;&#22312;&#27169;&#22359;&#30340;&#39030;&#23618;&#32423;&#21487;&#29992;&#12290;&#31532;&#20108;&#65292;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#34920;<span class="RktSym"><span class="badlink"><span class="RktValLink">dynamic-require</span></span></span>&#22312;&#26032;&#21019;&#24314;&#30340;&#29616;&#22330;&#20013;&#30340;&#23553;&#38381;&#27169;&#22359;&#12290;&#20316;&#20026;<span class="RktSym"><span class="badlink"><span class="RktValLink">dynamic-require</span></span></span>&#30340;&#19968;&#37096;&#20998;&#65292;&#24403;&#21069;&#27169;&#22359;&#20027;&#20307;&#23558;&#22312;&#26032;&#30340;&#29616;&#22330;&#34987;&#27714;&#20540;&#12290;&#31532;&#20108;&#20010;&#29305;&#24615;&#30340;&#21518;&#26524;&#26159;&#65292;&#35813;<span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span>&#19981;&#24212;&#31435;&#21363;&#20986;&#29616;&#22312;&#19968;&#20010;&#27169;&#22359;&#20013;&#25110;&#22312;&#27169;&#22359;&#30340;&#39030;&#23618;&#35843;&#29992;&#30340;&#20989;&#25968;&#20013;&#65307;&#21542;&#21017;&#65292;&#35843;&#29992;&#27169;&#22359;&#23558;&#22312;&#19968;&#20010;&#26032;&#30340;&#29616;&#22330;&#35843;&#29992;&#30456;&#21516;&#30340;&#27169;&#22359;&#65292;&#35832;&#22914;&#27492;&#31867;&#65292;&#35302;&#21457;&#19968;&#31995;&#21015;&#23558;&#24456;&#24555;&#32791;&#23613;&#20869;&#23384;&#30340;&#29616;&#22330;&#21019;&#24314;&#12290;</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><font class="badlink"><span class="RktModLink"><span class="RktMod">#lang</span></span></font><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><font class="badlink"><span class="RktModLink"><span class="RktSym">racket</span></span></font><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">provide</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">main</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;</span><span class="hspace">&nbsp;</span><span class="RktCmt">Don't</span><span class="hspace">&nbsp;</span><span class="RktCmt">do</span><span class="hspace">&nbsp;</span><span class="RktCmt">this!</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">p</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-get</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">indirect-place-invocation</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">p2</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-get</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktCmt">;</span><span class="hspace">&nbsp;</span><span class="RktCmt">Don't</span><span class="hspace">&nbsp;</span><span class="RktCmt">do</span><span class="hspace">&nbsp;</span><span class="RktCmt">this,</span><span class="hspace">&nbsp;</span><span class="RktCmt">either!</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">indirect-place-invocation</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr></table></blockquote><h4>20.3<tt>&nbsp;</tt><a name="(part._distributed-places)"></a>&#20998;&#24067;&#24335;&#29616;&#22330;</h4><p><font class="badlink"><span class="RktModLink"><span class="RktSym">racket/place/distributed</span></span></font>&#24211;&#20026;&#20998;&#24067;&#24335;&#32534;&#31243;&#25552;&#20379;&#20102;&#25903;&#25345;&#12290;</p><p>&#35813;&#31034;&#20363;&#28436;&#31034;&#20102;&#22914;&#20309;&#21551;&#21160;&#19968;&#20010;&#36828;&#31243;racket&#33410;&#28857;&#23454;&#20363;&#65292;&#22312;&#26032;&#30340;&#36828;&#31243;&#33410;&#28857;&#23454;&#20363;&#19978;&#21551;&#21160;&#36828;&#31243;&#29616;&#22330;&#65292;&#20197;&#21450;&#21551;&#21160;&#19968;&#20010;&#30417;&#35270;&#36828;&#31243;&#33410;&#28857;&#23454;&#20363;&#30340;&#20107;&#20214;&#24490;&#29615;&#12290;</p><p>&#31034;&#20363;&#20195;&#30721;&#20063;&#21487;&#20197;&#22312;<span class="stt">"racket/distributed/examples/named/master.rkt"</span>&#20013;&#25214;&#21040;&#12290;</p><blockquote class="Figure"><blockquote class="Centerfigure"><blockquote class="FigureInside"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><font class="badlink"><span class="RktModLink"><span class="RktMod">#lang</span></span></font><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><font class="badlink"><span class="RktModLink"><span class="RktSym">racket/base</span></span></font><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">require</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/place/distributed</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/class</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/place</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/runtime-path</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"bank.rkt"</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"tuple.rkt"</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define-runtime-path</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">bank-path</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"bank.rkt"</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define-runtime-path</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">tuple-path</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"tuple.rkt"</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">provide</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">main</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">main</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">remote-node</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">spawn-remote-racket-node</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"localhost"</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">#:listen-port</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">6344</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">tuple-place</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">supervise-place-at</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">remote-node</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">#:named</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">tuple-server</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">tuple-path</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">make-tuple-server</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">bank-place</span><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">supervise-place-at</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">remote-node</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">bank-path</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">make-bank</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">message-router</span></span></span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">remote-node</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">after-seconds</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">4</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">bank-new-account</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">bank-place</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">user0</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">bank-add</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">bank-place</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">user0</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">bank-removeM</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">bank-place</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">user0</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">5</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">after-seconds</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">2</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">c</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">connect-to-named-place</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">remote-node</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">tuple-server</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">d</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">connect-to-named-place</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">remote-node</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">tuple-server</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-hello</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">c</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-hello</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">d</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-set</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">c</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"user0"</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">100</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-set</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">d</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"user2"</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">200</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">c</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"user0"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">d</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"user2"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">d</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"user0"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">displayln</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">c</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"user2"</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">after-seconds</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">8</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">node-send-exit</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">remote-node</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">after-seconds</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">10</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">exit</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr></table></blockquote></blockquote><p class="Centertext"><span class="Legend"><span class="FigureTarget"><a name="(counter._(figure._named-example-master))" x-target-lift="Figure"></a>Figure&nbsp;1: </span>examples/named/master.rkt</span></p></blockquote><p><span class="RktSym"><span class="badlink"><span class="RktValLink">spawn-remote-racket-node</span></span></span>&#26368;&#21021;&#36830;&#25509;&#21040;<span class="stt">"&#26412;&#22320;&#20027;&#26426;&#65288;localhost&#65289;"</span>&#24182;&#24320;&#22987;&#19968;&#20010;&#22312;&#31471;&#21475;6344&#20390;&#21548;&#30340;racloud&#33410;&#28857;&#20197;&#20570;&#36827;&#19968;&#27493;&#35828;&#26126;&#12290;&#23545;&#26032;racloud&#33410;&#28857;&#30340;&#22788;&#29702;&#34987;&#20998;&#37197;&#32473;<span class="RktSym">remote-node</span>&#21464;&#37327;&#12290;&#26412;&#22320;&#20027;&#26426;&#34987;&#20351;&#29992;&#20197;&#20415;&#36825;&#20010;&#20363;&#23376;&#21487;&#20197;&#21482;&#20351;&#29992;&#19968;&#20010;&#21333;&#19968;&#30340;&#26426;&#22120;&#26469;&#36816;&#34892;&#12290;&#28982;&#32780;&#26412;&#22320;&#20027;&#26426;&#21487;&#20197;&#36890;&#36807;&#29992;ssh&#20844;&#38053;&#35775;&#38382;&#20219;&#20309;&#30340;&#20027;&#26426;&#21644;racket&#26356;&#25442;&#12290;<span class="RktSym">supervise-named-dynamic-place-at</span>&#22312;<span class="RktSym">remote-node</span>&#19978;&#21019;&#24314;&#19968;&#20010;&#26032;&#29616;&#22330;&#12290;&#26032;&#30340;&#29616;&#22330;&#23558;&#30001;&#23427;&#30340;&#21517;&#31216;&#31526;&#21495;<span class="RktVal">'</span><span class="RktVal">tuple-server</span>&#22312;&#21069;&#26223;&#20013;&#26631;&#35760;&#12290;&#19968;&#20010;&#29616;&#22330;&#25551;&#36848;&#31526;&#34987;&#35201;&#27714;&#36890;&#36807;&#20351;&#29992;<span class="RktSym">tuple-path</span>&#27169;&#22359;&#36335;&#24452;&#21644;<span class="RktVal">'</span><span class="RktVal">make-tuple-server</span>&#30340;<span class="RktSym">dynamic-place</span>&#36820;&#22238;&#12290;</p><p>&#20803;&#32452;&#26381;&#21153;&#22120;&#29616;&#22330;&#30340;&#20195;&#30721;&#23384;&#22312;&#20110;&#25991;&#20214;<span class="stt">"tuple.rkt"</span>&#20013;&#12290;<span class="stt">"tuple.rkt"</span>&#25991;&#20214;&#21253;&#21547;<span class="RktSym"><span class="badlink"><span class="RktValLink">define-named-remote-server</span></span></span>&#34920;&#30340;&#20351;&#29992;&#65292;&#20026;&#20102;&#35843;&#29992;&#23427;&#36890;&#36807;<span class="RktSym">supervise-named-dynamic-place-at</span>&#24688;&#24403;&#22320;&#23450;&#20041;&#20102;&#19968;&#20010;&#23454;&#38469;&#30340;RPC&#26381;&#21153;&#22120;&#12290;</p><blockquote class="Figure"><blockquote class="Centerfigure"><blockquote class="FigureInside"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><font class="badlink"><span class="RktModLink"><span class="RktMod">#lang</span></span></font><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><font class="badlink"><span class="RktModLink"><span class="RktSym">racket/base</span></span></font><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">require</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/match</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/place/define-remote-server</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr><tr><td><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define-named-remote-server</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">tuple-server</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define-state</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">h</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">make-hash</span></span></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define-rpc</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">set</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">hash-set!</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">h</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define-rpc</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">hash-ref</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">h</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define-cast</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">hello</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">printf</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"Hello</span><span class="hspace">&nbsp;</span><span class="RktVal">from</span><span class="hspace">&nbsp;</span><span class="RktVal">define-cast\n"</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">flush-output</span></span></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta">&#160;</span></td></tr></table></blockquote></blockquote><p class="Centertext"><span class="Legend"><span class="FigureTarget"><a name="(counter._(figure._named-example))" x-target-lift="Figure"></a>Figure&nbsp;2: </span>examples/named/tuple.rkt</span></p></blockquote><p><span class="RktSym"><span class="badlink"><span class="RktValLink">define-named-remote-server</span></span></span>&#34920;&#25509;&#21463;&#19968;&#20010;&#26631;&#35782;&#31526;&#21644;&#19968;&#20010;&#33258;&#23450;&#20041;&#34920;&#36798;&#24335;&#21015;&#34920;&#20316;&#20026;&#23427;&#30340;&#21442;&#25968;&#12290;&#20174;&#19968;&#20010;place-thunk&#20989;&#25968;&#26631;&#35782;&#31526;&#36890;&#36807;&#39044;&#20808;&#35745;&#21010;&#36825;&#20010;<span class="stt">make-</span>&#21069;&#32512;&#26469;&#34987;&#21019;&#24314;&#12290;&#22312;&#36825;&#31181;&#24773;&#20917;&#19979;<span class="RktSym">make-tuple-server</span>&#12290;<span class="RktSym">make-tuple-server</span>&#26631;&#35782;&#31526;&#26159;<span class="RktSym">place-function-name</span>&#32473;&#21040;&#19978;&#36793;&#30340;<span class="RktSym">supervise-named-dynamic-place-at</span>&#34920;&#12290;<span class="RktSym">define-state</span>&#23450;&#21046;&#34920;&#36716;&#25442;&#25104;&#19968;&#20010;&#31616;&#21333;&#30340;<span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span>&#34920;&#65292;&#23427;&#36890;&#36807;<span class="RktSym">define-rpc</span>&#34920;&#20851;&#38381;&#12290;</p><p><span class="RktSym">define-rpc</span>&#34920;&#25193;&#23637;&#20026;&#20004;&#37096;&#20998;&#12290;&#31532;&#19968;&#37096;&#20998;&#26159;&#35843;&#29992;rpc&#20989;&#25968;&#30340;&#23458;&#25143;&#26426;&#23384;&#26681;&#12290;&#23458;&#25143;&#26426;&#20989;&#25968;&#21517;&#23383;&#26159;&#36890;&#36807;&#36830;&#25509;<span class="RktSym"><span class="badlink"><span class="RktValLink">define-named-remote-server</span></span></span>&#26631;&#35782;&#31526;&#20135;&#29983;&#30340;&#65292;<span class="stt">&#20803;&#32452;&#26381;&#21153;&#22120;&#65288;tuple-server&#65289;</span>&#65292;&#29992;RPC&#20989;&#25968;&#21517;&#31216;<span class="stt">&#35774;&#32622;</span>&#20197;&#20135;&#29983;<span class="RktSym">tuple-server-set</span>&#12290;RPC&#23458;&#25143;&#26426;&#20989;&#25968;&#33719;&#21462;&#19968;&#20010;&#30446;&#26631;&#21442;&#25968;&#65292;&#23427;&#26159;&#19968;&#20010;<span class="RktSym"><span class="badlink"><span class="RktValLink">remote-connection%</span></span></span>&#25551;&#36848;&#31526;&#65292;&#36827;&#32780;&#26159;RPC&#20989;&#25968;&#21442;&#25968;&#12290;&#36825;&#20010;RPC&#23458;&#25143;&#26426;&#20989;&#25968;&#36890;&#36807;&#35843;&#29992;&#19968;&#20010;&#20869;&#37096;&#20989;&#25968;<span class="RktSym">named-place-channel-put</span>&#23558;RPC&#20989;&#25968;&#21517;&#12289;<span class="RktSym">set</span>&#21644;RPC&#21442;&#25968;&#21457;&#36865;&#21040;&#30446;&#26631;&#12290;RPC&#23458;&#25143;&#26426;&#25509;&#19979;&#26469;&#35843;&#29992;<span class="RktSym">named-place-channel-get</span>&#20197;&#31561;&#24453;RPC&#21709;&#24212;&#12290;</p><p><span class="RktSym">define-rpc</span>&#30340;&#31532;&#20108;&#20010;&#25193;&#23637;&#37096;&#20998;&#26159;RPC&#35843;&#29992;&#30340;&#26381;&#21153;&#22120;&#23454;&#29616;&#12290;&#26381;&#21153;&#22120;&#30001;<span class="RktSym">make-tuple-server</span>&#20989;&#25968;&#20869;&#30340;&#19968;&#20010;&#21305;&#37197;&#34920;&#36798;&#24335;&#23454;&#29616;&#12290;<span class="RktSym">tuple-server-set</span>&#30340;&#21305;&#37197;&#23376;&#21477;&#21305;&#37197;&#20197;&#29992;<span class="RktVal">'</span><span class="RktVal">set</span>&#31526;&#21495;&#24320;&#22836;&#30340;&#28040;&#24687;&#12290;&#26381;&#21153;&#22120;&#36890;&#36807;&#36890;&#20449;&#21442;&#25968;&#25191;&#34892;RPC&#35843;&#29992;&#65292;&#24182;&#23558;&#32467;&#26524;&#21457;&#36865;&#22238;RPC&#23458;&#25143;&#26426;&#12290;</p><p>&#38500;&#20102;&#27809;&#26377;&#20174;&#26381;&#21153;&#22120;&#21040;&#23458;&#25143;&#26426;&#30340;&#24212;&#31572;&#28040;&#24687;&#22806;&#65292; <span class="RktSym">define-cast</span>&#34920;&#31867;&#20284;&#20110;<span class="RktSym">define-rpc</span>&#34920;&#12290;</p><blockquote class="Figure"><blockquote class="Centerfigure"><blockquote class="FigureInside"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">module</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">tuple</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/base</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">require</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/place</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">racket/match</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define/provide</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-set</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">named-place-channel-put</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">set</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">named-place-channel-get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define/provide</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">named-place-channel-put</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">named-place-channel-get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define/provide</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">tuple-server-hello</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">named-place-channel-put</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">dest</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">hello</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">define/provide</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">make-tuple-server</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">h</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">make-hash</span></span></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">loop</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">msg</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-get</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">log-to-parent-real</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">msg</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">#:severity</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">severity</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">info</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-put</span></span></span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">ch</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">log-message</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">severity</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">msg</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">syntax-parameterize</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">log-to-parent</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">make-rename-transformer</span></span></span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">#'</span></span></span><span class="RktSym">log-to-parent-real</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">match</span></span></span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">msg</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">set</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">src</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">result</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">hash-set!</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">h</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">v</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-put</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">src</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">result</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">loop</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">get</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">src</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">result</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">hash-ref</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">h</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">k</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">place-channel-put</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">src</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">result</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">loop</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">list</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym"><span class="badlink"><span class="RktValLink">'</span></span></span><span class="RktSym">hello</span><span class="RktPn">)</span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">src</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">define</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktSym">result</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">let</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">printf</span></span></span><span class="RktMeta"></span><span class="hspace">&nbsp;</span><span class="RktMeta"></span><span class="RktVal">"Hello</span><span class="hspace">&nbsp;</span><span class="RktVal">from</span><span class="hspace">&nbsp;</span><span class="RktVal">define-cast\n"</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym"><span class="badlink"><span class="RktValLink">flush-output</span></span></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktPn">(</span><span class="RktSym">loop</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr><tr><td><span class="RktMeta"></span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktMeta"></span><span class="RktSym">loop</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktMeta"></span></td></tr></table></blockquote></blockquote><p class="Centertext"><span class="Legend"><span class="FigureTarget"><a name="(counter._(figure._define-named-remote-server-expansion))" x-target-lift="Figure"></a>Figure&nbsp;3: </span>Expansion of define-named-remote-server</span></p></blockquote><div class="navsetbottom"><span class="navleft"><div class="nosearchform"></div>&nbsp;&nbsp;</span><span class="navright">&nbsp;&nbsp;<a href="performance.html" title="backward to &quot;19 性能&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="index.html" title="up to &quot;Racket指南&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="running.html" title="forward to &quot;21 运行和创建可执行程序&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>